﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="dishlist.aspx.cs" Inherits="OF.Web.admin.dishlist" %>

<%@ Register Assembly="OF.Controls" Namespace="OF.Controls" TagPrefix="cc1" %>
<%@ Register Src="~/admin/controls/head.ascx" TagPrefix="uc1" TagName="head" %>
<%@ Register Src="~/admin/controls/footer.ascx" TagPrefix="uc1" TagName="footer" %>
<%@ Register Src="~/admin/controls/menu.ascx" TagPrefix="uc1" TagName="menu" %>

<!DOCTYPE HTML>
<html>
<head>
    <title>商户资料</title>
    <meta charset="gbk">
    <link href="res/css/main.css" rel="stylesheet">
    <link href="res/css/public.css" rel="stylesheet">
    <link href="res/css/table.css" rel="stylesheet">
    <link href="res/css/flexigrid.css" rel="stylesheet">
    <script type="text/javascript" src="res/js/jquery-1.8.0.min.js"></script>
    <script src="res/js/flexigrid.pack.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
        <uc1:head runat="server" ID="head" />
        <div id="page">
            <div class="clearfix" id="content">
                <div class="col-main">
                    <div class="main-wrap">
                        <div class="division">
                            <table>
                                <tbody>
                                    <tr>
                                        <td>菜名:</td>
                                        <td>
                                            <cc1:OFTextBox ID="txtkey" runat="server" CssClass="ipt ipt-150" SqlField="dishname" SearcherGroupName="basic" SqlCharacter="包含"></cc1:OFTextBox>
                                        </td>
                                        <td>
                                            <asp:Button ID="btnSearch" runat="server" CssClass="rz-deep-btn" OnClick="btnSearch_Click" Text="搜索" />
                                            <input type="button" onclick="javascript: window.location.href = 'dishadd.aspx?way=add'" value="添加菜品" class="rz-deep-btn"></input>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                    <br />
                    <div class="main-wrap">
                        <table id="flexme1" class="gridScroller">
                            <thead>
                                <tr>
                                    <th width="60">编号</th>
                                    <th width="100">菜名</th>
                                    <th width="100">类目</th>
                                    <th width="100">价格</th>
                                    <th width="100">状态</th>
                                    <th width="100">下单次数</th>
                                    <th width="100">编辑</th>
                                </tr>
                            </thead>
                            <tbody>
                                <asp:Repeater ID="RepDish" runat="server">
                                    <ItemTemplate>
                                        <tr>
                                            <td><%#Eval("id") %></td>
                                            <td><%#Eval("dishname") %></td>
                                            <td><%#GetCartName(Eval("catid")) %></td>
                                            <td><%#Eval("price") %></td>
                                            <td><asp:Image ID="img" ImageUrl='<%#Convert.ToBoolean(Eval("state"))?"res/image/yes.gif":"res/image/no.gif"%>' runat="server"/></td>
                                            <td><%#Eval("ordertimes") %></td>
                                            <td><a href="dishadd.aspx?way=edit&id=<%#Eval("id") %>">编辑</a></td>
                                        </tr>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </tbody>
                        </table>
                        <%--分页--%>
                        <cc1:OFPager ID="OFPager" runat="server" OnPageChanged="Pager_PageChanged" PageSize="15" class="pagination" />
                        <asp:Label ID="Nodata" runat="server" Text="暂无数据" CssClass="nodata"></asp:Label>
                    </div>
                </div>
                <uc1:menu runat="server" ID="menu" />
            </div>
        </div>
        <uc1:footer runat="server" ID="footer" />
        <script type="text/javascript">
            $(document).ready(function ($) {
                $('#flexme1').flexigrid();
            });
        </script>
    </form>
</body>

</html>
